//
//  TRAddressTableViewCell.m
//  WeiMiLan
//
//  Created by anan on 15/8/4.
//  Copyright (c) 2015年 Mac. All rights reserved.
//

#import "TRAddressTableViewCell.h"

@implementation TRAddressTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setInfo:(NSDictionary *)info {
    _info = info;
    
    NSString *address = info[@"ADDRESS"];
    NSArray *arr = [address componentsSeparatedByString:@";"];
    if (arr.count==4) {
        self.labelName.text = arr[0];
        self.labelPhone.text = arr[1];
        self.labelDesc.text = [NSString stringWithFormat:@"%@%@",arr[2],arr[3]];
    }else{
        [self.labelDesc setText:address];
    }
    
    if ([self.info ql_intForKey:@"MARK"]==1) {
        self.buttonDefault.hidden = NO;
    }else{
        self.buttonDefault.hidden = YES;
    }
}

- (NSInteger)getHeight {
    return 90;
}

@end
